package com.cad3d.filemanager.dao;

// Generated 2013/06/04 18:10:18 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Filemanagement generated by hbm2java
 */
@Entity
@Table(name = "filemanagement", catalog = "cadfilemanager")
public class Filemanagement implements java.io.Serializable {

	private Integer fileId;
	private User user;
	private String fileName;
	private String filePath;
	private String fileType;
	private int fileSize;
	private Date fileUploadDate;
	private int downloadTime;
	private String thumbnailPath;
	private String absolutePath;
	private boolean filePublic;

	public Filemanagement() {
	}

	public Filemanagement(User user, String fileName, String filePath,
			String fileType, int fileSize, Date fileUploadDate,
			int downloadTime, String thumbnailPath, String absolutePath, boolean filePublic) {
		this.user = user;
		this.fileName = fileName;
		this.filePath = filePath;
		this.fileType = fileType;
		this.fileSize = fileSize;
		this.fileUploadDate = fileUploadDate;
		this.downloadTime = downloadTime;
		this.thumbnailPath = thumbnailPath;
		this.absolutePath = absolutePath;
		this.filePublic = filePublic;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "fileId", unique = true, nullable = false)
	public Integer getFileId() {
		return this.fileId;
	}

	public void setFileId(Integer fileId) {
		this.fileId = fileId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userId", nullable = false)
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "fileName", nullable = false, length = 200)
	public String getFileName() {
		return this.fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	@Column(name = "filePath", nullable = false, length = 299)
	public String getFilePath() {
		return this.filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	@Column(name = "fileType", nullable = false, length = 100)
	public String getFileType() {
		return this.fileType;
	}

	public void setFileType(String fileType) {
		this.fileType = fileType;
	}

	@Column(name = "fileSize", nullable = false)
	public int getFileSize() {
		return this.fileSize;
	}

	public void setFileSize(int fileSize) {
		this.fileSize = fileSize;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "fileUploadDate", nullable = false, length = 19)
	public Date getFileUploadDate() {
		return this.fileUploadDate;
	}

	public void setFileUploadDate(Date fileUploadDate) {
		this.fileUploadDate = fileUploadDate;
	}

	@Column(name = "downloadTime", nullable = false)
	public int getDownloadTime() {
		return this.downloadTime;
	}

	public void setDownloadTime(int downloadTime) {
		this.downloadTime = downloadTime;
	}

	@Column(name = "thumbnailPath", nullable = false, length = 200)
	public String getThumbnailPath() {
		return this.thumbnailPath;
	}

	public void setThumbnailPath(String thumbnailPath) {
		this.thumbnailPath = thumbnailPath;
	}

	@Column(name = "absolutePath", nullable = false, length = 200)
	public String getAbsolutePath() {
		return this.absolutePath;
	}

	public void setAbsolutePath(String absolutePath) {
		this.absolutePath = absolutePath;
	}
	
	@Column(name = "filePublic", nullable = false, length = 10)
	public boolean isFilePublic() {
		return filePublic;
	}

	public void setFilePublic(boolean filePublic) {
		this.filePublic = filePublic;
	}

}
